fix: bound stale running turn recovery (rebased) - #85
Merged
Conversation
…ground stop ids, test pump budget)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rebases and completes #83 (draft) onto current main, fixing #80.
What this carries over from #83
projection.status=runningno longer refreshes the 120s no-progress deadline.session/goal show:max_turn_requestsoutcome as before.Adaptations to current main (post #84)
session.tsconflicts: kept the steer-swallow guard,recordProtocolProgress()now replaces the barelastProgressrefresh.else if (turn.cancelled)branch — main's in-loop cancel check already covers it (the branch would misreport a user cancel asmax_turn_requests).probePromptLockmatches the lock-busy error by code 1308 first (same code the send-retry loop keys on), message-text matching kept only as a legacy fallback — guards against backend message drift killing a live turn.stopBackendTurncalls passturn.foregroundExecutionIdso the v4 stop actually kills the generation.prompt()has more async preamble).Policy decision on #83's open question
No hard cap on lock-held deferral (backend-owned long work is legitimate; user cancel remains the escape hatch). A follow-up to surface deferral to the client as a session/update note is suggested instead.
Verification
tsc --noEmitclean, eslint clean, prettier cleanCloses #80
Supersedes #83